import React, { Component } from 'react';
import { HashRouter,NavLink,Route,Switch,Redirect} from 'react-router-dom';
import Loadable from 'react-loadable';
const Home=Loadable({
  loader:()=>import('./pages/Home'),
  loading:()=><div>加载中</div>
});
const Login=Loadable({
  loader:()=>import('./pages/Login.js'),
  loading:()=><div>加载中</div>
});


export default class App extends Component {
  render() {
    return (
      <div style={{height:'100%'}}>
           <HashRouter>
                <Switch>
                     <Redirect from='/' exact to='/home' />
                     <Route path='/home' component={Home}/>
                     <Route path='/login' component={Login}/>
                </Switch>
           </HashRouter>
      </div>
    )
  }
}

